<h1>Mostrar Estilo <%= @cultural_heritage_style.name %></h1>
<% if flash[:notice] %>
    <div id="notice"><%= flash[:notice] %></div>
<% end %>
<div class="shadow">
<fieldset id="agrupacion" >
<legend>Datos Básicos </legend>
<p>
  <b>Nombre:</b>
  <%= @cultural_heritage_style.name %>
</p>
<% if ! @cultural_heritage_style.description.blank? %>
<p>
  <b>Descripción:</b>
  <%= @cultural_heritage_style.description %>
</p>
<%end%>
</fieldset>
  <div id="lineaform"></div>
  <fieldset id="agrupacion" >
    <legend>Patrimonios por Estilo </legend>
    <% if !(@cultural_heritage_style.list_cultural_heritage.blank?) %>
    <table class="paginated_table sorted_table" >
      <thead>
      <tr>
        <th>Nombre</th>
        <th>Grupo</th>
        <th>Sub Grupo</th>
      </tr>
    </thead>
    <tbody>
    <% @cultural_heritage_style.list_cultural_heritage.each do |cultural_heritage| %>
      <tr>
        <td>
           <%if cultural_heritage.group == 1%>
           <%= link_to cultural_heritage.name_code,{:controller=>"/cultural_heritage/cultural_heritages",:action => 'show',:id => cultural_heritage.id},:title => cultural_heritage.description %>
          <%else%>
           <%= link_to cultural_heritage.name_code,{:controller=>"/cultural_heritage/cultural_heritage_properties",:action => 'show',:id => cultural_heritage.id},:title => cultural_heritage.description %>
          <%end%>
        </td>
        <td><%= cultural_heritage.obj_group.name %></td>
        <td><%= cultural_heritage.obj_subGroup.name %></td>
      </tr>
    <% end %>
    </tbody>
    </table>
    <% else %>
        <p> Ningún registro encontrado</p>
    <% end %>
  </fieldset>
</div>
<% if (user_signed_in? && ([2].include?(current_user.role))) %>
<%= link_to 'Editar', edit_cultural_heritage_style_path(@cultural_heritage_style) %> |
<%end%>
<%= link_to 'Regresar', cultural_heritage_styles_path %>
